package com.mornd.gulimall.product.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import com.mornd.gulimall.common.core.entity.PageEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 品牌分类关联
 * </p>
 *
 * @author mornd
 * @since 2023-07-23
 */
@Getter
@Setter
@TableName("pms_category_brand_relation")
public class CategoryBrandRelation extends PageEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 品牌id
     */
    @NotNull
    private Long brandId;

    /**
     * 分类id
     */
    private Long catelogId;

    private String brandName;

    private String catelogName;

    @NotEmpty(message = "分类id不能为空")
    @TableField(exist = false)
    private Long[] catelogIdList;

}
